From: Jasper St. Pierre Date: Mon, 20 Feb 2012 23:23:12 +0000 (-0500) Subject: browser-plugin: Correct check for checking the hostname/protocol X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~7002 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9400d8f6db8459e53487b42e4152d2232c55e832;p=gnome-shell.git browser-plugin: Correct check for checking the hostname/protocol While it's extremely unlikely that document.location would not be an object in the browser setting, this check is incorrect and we could possibly crash an NPAPI host if this is the case. https://bugzilla.gnome.org/show_bug.cgi?id=670489 --- diff --git a/browser-plugin/browser-plugin.c b/browser-plugin/browser-plugin.c index 8f7e87696..16fae1cee 100644 --- a/browser-plugin/browser-plugin.c +++ b/browser-plugin/browser-plugin.c @@ -104,7 +104,7 @@ check_origin_and_protocol (NPP instance) &location)) goto out; - if (!NPVARIANT_IS_OBJECT (document)) + if (!NPVARIANT_IS_OBJECT (location)) goto out; hostname = get_string_property (instance,